from fastapi import APIRouter, HTTPException
from pydantic import BaseModel
from app.routers.test.test import test2

test = APIRouter()


@test.post('/{id}', description="测试接口的详细信息",summary="这是测试接口")
def getAllTestItem(id:int):
    # print("test")
    result = test2(id)
    if result:
        raise HTTPException(403, "数据不符合要求")
    return {"msg": "你好", "id": id, "result": result}
